import http from 'k6/http';
import {check} from 'k6';

export let options={
	vus:1,
};

var count = 200;
export default function(){
	
	var url = 'http://demoUrl';
	
	var i = 0;
	while(i<100){
		i++;
		count++;
		var patientData = JSON.stringify({
			name:'测试'+count,
			administrativeGenderCode:'1',
			ids:[{
				'code':'1.11',
				'identifier':''+count
			}],
		});
		var params = {
			headers:{
				'Content-Type':'application/json',
				'Authorization':'89e605492909b0196e0ca25a0cc0205c1d97540e339ba2664bf3bcb59144dc9d',
			},
			
		};
		let res = http.post(url, patientData, params);
		check(res, {'status was 200':(r)=>r.status==200});
	}
	
}